﻿using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FurStudy.Core
{
    public class F_Person : EntityBase, IEntitySeedData<F_Person>
    {
        /// <summary>
        /// 姓名
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 年龄
        /// </summary>
        public int Age { get; set; }

        /// <summary>
        /// 住址
        /// </summary>
        public string Address { get; set; }

        /// <summary>
        /// 配置种子数据
        /// 主键值必须手动插入，因为会自动关闭主键或自增标识检查。
        /// </summary>
        /// <param name="dbContext"></param>
        /// <param name="dbContextLocator"></param>
        /// <returns></returns>
        public IEnumerable<F_Person> HasData(DbContext dbContext, Type dbContextLocator)
        {
            return new List<F_Person>
            {
                new F_Person { Id = 1, Name = "百小僧", Address = "广东省中山市" },
                new F_Person { Id = 2, Name = "新生帝", Address = "广东省珠海市"  }
            };
        }
    }
}
